<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Manage extends Model
{
    use HasFactory;
    public $timestamps = false;
    protected $table = 'ad_manage';

    public static function executeInsertUpdate($request)
    {
        $nick_name = $request->nick_name ?? null;
        $account = $request->account ?? null;
        $mobile = $request->mobile ?? null;
        $password = $request->password ?? null;
        return [
            'nick_name' => $nick_name,
            'account' => $account,
            'mobile' => $mobile,
            'password' => md5(md5($password)),
        ];
    }
}
